﻿using MyCode.Project.Services;
using System.Web.Http;


namespace MyCode.Project.WebApi.Areas.Admin.Controllers
{
    /// <summary>
    /// 商品分类业绩统计,仅供系统内部调用
    /// </summary>
    public class StaffDataEnterpriseWechatController : BaseAdminController
    {
        private IStaffDataEnterpriseWechatService _staffDataEnterpriseWechatService;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="staffDataEnterpriseWechatService"></param>
        public StaffDataEnterpriseWechatController(IStaffDataEnterpriseWechatService staffDataEnterpriseWechatService)
        {
            _staffDataEnterpriseWechatService = staffDataEnterpriseWechatService;
        }

        #region InitDepartment(刷公司微信的部门和员工资料)
        /// <summary>
        /// 刷公司微信的部门和员工资料
        /// </summary>       
        /// <returns></returns>
        [HttpGet]
        [AllowAnonymous]
        public void InitDepartment()
        {
            _staffDataEnterpriseWechatService.InitDepartment();
        }
        #endregion


        #region RunWechatVSKingDee(执行需要比对的数据任务)
        /// <summary>
        /// 执行需要比对的数据任务
        /// </summary>       
        /// <returns></returns>
        [HttpGet]
        [AllowAnonymous]
        public void RunWechatVSKingDee()
        {
            _staffDataEnterpriseWechatService.RunWechatVSKingDee();
        }
        #endregion


        #region InitDepartment(创建需要比对的数据任务)
        /// <summary>
        /// 创建需要比对的数据任务
        /// </summary>       
        /// <returns></returns>
        [HttpGet]
        [AllowAnonymous]
        public void AddWechatVSKingDeeJob()
        {
            _staffDataEnterpriseWechatService.AddWechatVSKingDeeJob();
        }
        #endregion

        #region InitDepartment(定时任务刷微信OPENID)
        /// <summary>
        /// 定时任务刷微信OPENID
        /// </summary>       
        /// <returns></returns>
        [HttpGet]
        [AllowAnonymous]
        public void TaskAddOpenIdJob()
        {
            _staffDataEnterpriseWechatService.TaskAddOpenIdJob();
        }
        #endregion

    }
}
